/**
 * 
 */
package org.ccnetconfig.ccdroid;

import java.util.Date;

/**
 * @author Ryan
 * 
 */
public class Project {
	public static final String	SUCCESS			= "Success";
	public static final String	FAILURE			= "Failure";
	public static final String	EXCEPTION		= "Exception";
	public static final String	UNKNOWN			= "Unknown";
	public static final String	BUILDING		= "Building";
	public static final String	IDLE				= "Idle";

	private String							name				= "";
	private boolean							enabled			= false;
	private Settings						settings		= null;
	private Date								modified		= null;
	private String							activity		= "";
	private String							lastStatus	= "";
	private String							lastLabel		= "";
	private Date								lastBuild		= null;
	private Date								nextBuild		= null;
	private String							message			= "";
	private String							stage				= "";
	private String							category		= "";
	private int									id					= 0;

	/**
	 * Creates a new instance of a Project
	 * 
	 * @param id
	 * @param name
	 * @param settings
	 */
	public Project ( int id, String name, Settings settings ) {
		this.setName ( name );
		this.setSettings ( settings );
		this.setId ( id );
	}

	/**
	 * Creates a new instance of a Project
	 * 
	 * @param name
	 * @param settings
	 */
	public Project ( String name, Settings settings ) {
		this ( 0, name, settings );
	}

	/**
	 * @param id
	 *          the id to set
	 */
	public void setId ( int id ) {
		if ( id <= 0 )
			this.id = id;
	}

	/**
	 * @return the id
	 */
	public int getId ( ) {
		return id;
	}

	/**
	 * @param category
	 *          the category to set
	 */
	public void setCategory ( String category ) {
		this.category = category;
	}

	/**
	 * @return the category
	 */
	public String getCategory ( ) {
		return category;
	}

	/**
	 * @param stage
	 *          the stage to set
	 */
	public void setStage ( String stage ) {
		this.stage = stage;
	}

	/**
	 * @return the stage
	 */
	public String getStage ( ) {
		return stage;
	}

	/**
	 * @param message
	 *          the message to set
	 */
	public void setMessage ( String message ) {
		this.message = message;
	}

	/**
	 * @return the message
	 */
	public String getMessage ( ) {
		return message;
	}

	/**
	 * @param nextBuild
	 *          the nextBuild to set
	 */
	public void setNextBuild ( Date nextBuild ) {
		this.nextBuild = nextBuild;
	}

	/**
	 * @return the nextBuild
	 */
	public Date getNextBuild ( ) {
		return nextBuild;
	}

	/**
	 * @param lastBuild
	 *          the lastBuild to set
	 */
	public void setLastBuild ( Date lastBuild ) {
		this.lastBuild = lastBuild;
	}

	/**
	 * @return the lastBuild
	 */
	public Date getLastBuild ( ) {
		return lastBuild;
	}

	/**
	 * @param lastLabel
	 *          the lastLabel to set
	 */
	public void setLastLabel ( String lastLabel ) {
		this.lastLabel = lastLabel;
	}

	/**
	 * @return the lastLabel
	 */
	public String getLastLabel ( ) {
		return lastLabel;
	}

	/**
	 * @param lastStatus
	 *          the lastStatus to set
	 */
	public void setLastStatus ( String lastStatus ) {
		this.lastStatus = lastStatus;
	}

	/**
	 * @return the lastStatus
	 */
	public String getLastStatus ( ) {
		return lastStatus;
	}

	/**
	 * @param activity
	 *          the activity to set
	 */
	public void setActivity ( String activity ) {
		this.activity = activity;
	}

	/**
	 * @return the activity
	 */
	public String getActivity ( ) {
		return activity;
	}

	/**
	 * @param modified
	 *          the modified to set
	 */
	public void setModified ( Date modified ) {
		this.modified = modified;
	}

	/**
	 * @return the modified
	 */
	public Date getModified ( ) {
		return modified;
	}

	/**
	 * @param name
	 *          the name to set
	 */
	public void setName ( String name ) {
		this.name = name;
	}

	/**
	 * @return the name
	 */
	public String getName ( ) {
		return name;
	}

	/**
	 * @param enabled
	 *          the enabled to set
	 */
	public void setEnabled ( boolean enabled ) {
		this.enabled = enabled;
	}

	/**
	 * @return the enabled
	 */
	public boolean isEnabled ( ) {
		return enabled;
	}

	/**
	 * @param settings
	 *          the settings to set
	 */
	public void setSettings ( Settings settings ) {
		this.settings = settings;
	}

	/**
	 * @return the settings
	 */
	public Settings getSettings ( ) {
		return settings;
	}
}
